﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Master Resources/XLMaster.Master"
    AutoEventWireup="true" CodeBehind="ViewAccount.aspx.cs" Inherits="XclusiveClient.ViewAccount" %>

<asp:Content ID="Content1" ContentPlaceHolderID="Content" runat="server">
    <center>
    <h1>Your Account's Information</h1>
    <table>
        <tr>
            <td style="width: 290px">
            </td>
            <td width="125px">
                <asp:Label ID="username" runat="server" Text="Username"></asp:Label>
            </td>
            <td>
                <asp:Label ID="lblusername" runat="server"></asp:Label>
            </td>
        </tr>
        <tr>
            <td style="width: 290px">
            </td>
            <td width="125px">
                <asp:Label ID="full_name" runat="server" Text="Full Name"></asp:Label>
            </td>
            <td>
                <asp:Label ID="lblfull_name" runat="server"></asp:Label>
            </td>
        </tr>
        <tr>
            <td style="width: 290px">
            </td>
            <td width="125px">
                <asp:Label ID="email" runat="server" Text="Email"></asp:Label>
            </td>
            <td>
                <asp:Label ID="lblemail" runat="server"></asp:Label>
            </td>
        </tr>
        <tr>
            <td style="width: 290px">
            </td>
            <td width="125px">
                <asp:Label ID="contact_number" runat="server" Text="Contact Number"></asp:Label>
            </td>
            <td>
                <asp:Label ID="lblcontact_number" runat="server"></asp:Label>
            </td>
        </tr>
        <tr>
            <td style="width: 290px">
            </td>
            <td width="125px">
                <asp:Label ID="address" runat="server" Text="Address"></asp:Label>
            </td>
            <td>
                <asp:Label ID="lbladdress" runat="server"></asp:Label>
            </td>
        </tr>
        <tr>
            <td style="width: 290px">
            </td>
            <td width="125px">
                <asp:Label ID="company_name" runat="server" Text="Company Name"></asp:Label>
            </td>
            <td>
                <asp:Label ID="lblcompany_name" runat="server"></asp:Label>
            </td>
        </tr>
        <tr>
            <td style="width: 290px">
            </td>
            <td width="125px">
                <asp:Label ID="company_email" runat="server" Text="Company Email"></asp:Label>
            </td>
            <td>
                <asp:Label ID="lblcompany_email" runat="server"></asp:Label>
            </td>
        </tr>
        <tr>
            <td style="width: 290px">
            </td>
            <td width="125px">
                <asp:Label ID="company_country" runat="server" Text="Company Country"></asp:Label>
            </td>
            <td>
                <asp:Label ID="lblcompany_country" runat="server"></asp:Label>
            </td>
        </tr>
        <tr>
            <td style="width: 290px">
            </td>
            <td width="125px">
                <asp:Label ID="company_address" runat="server" Text="Company Address"></asp:Label>
            </td>
            <td>
                <asp:Label ID="lblcompany_address" runat="server"></asp:Label>
            </td>
        </tr>
    </table>
        <asp:Label ID="lblStatus" runat="server" Visible="false"></asp:Label>
    <br />
        <asp:Button ID="btnUpdate" runat="server" Text="Update" OnClick="btnUpdate_Click"></asp:Button>
        &nbsp;&nbsp;<asp:Button ID="btnDelete" runat="server" Text="Delete" OnClick="btnDelete_Click"></asp:Button>
        &nbsp;&nbsp;<asp:Button ID="btnLogout" runat="server" Text="Logout" 
            onclick="btnLogout_Click"></asp:Button>
    <br />
    <br />
    <br />
    <asp:GridView ID="GridView1" runat="server" 
            AutoGenerateColumns="False" DataKeyNames="employeeID" 
        DataSourceID="XclusiveDataSource" BackColor="White" BorderColor="#DEDFDE" 
            BorderStyle="None" BorderWidth="1px" CellPadding="4" ForeColor="Black" 
            GridLines="Vertical" style="text-align:center">
        <AlternatingRowStyle BackColor="White" />
        <Columns>
            <asp:BoundField DataField="employeeID" HeaderText="Employee ID" 
                InsertVisible="False" ReadOnly="True" SortExpression="employeeID" />
            <asp:BoundField DataField="name" HeaderText="Name" SortExpression="name" />
            <asp:BoundField DataField="company_name" HeaderText="Company Name" 
                SortExpression="company_name" />
        </Columns>
        <FooterStyle BackColor="#CCCC99" />
        <HeaderStyle BackColor="#6B696B" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="#F7F7DE" ForeColor="Black" HorizontalAlign="Right" />
        <RowStyle BackColor="#F7F7DE" />
        <SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" />
        <SortedAscendingCellStyle BackColor="#FBFBF2" />
        <SortedAscendingHeaderStyle BackColor="#848384" />
        <SortedDescendingCellStyle BackColor="#EAEAD3" />
        <SortedDescendingHeaderStyle BackColor="#575357" />
    </asp:GridView>
    <asp:SqlDataSource ID="XclusiveDataSource" runat="server" 
        ConnectionString="<%$ ConnectionStrings:XclusiveConnectionString %>" 
        
        SelectCommand="SELECT employeeID, name, company_name, account_type FROM Employee WHERE (company_name = @company_name)">
        <SelectParameters>
            <asp:SessionParameter Name="company_name" SessionField="company_name" 
                Type="String" />
        </SelectParameters>
    </asp:SqlDataSource>
</center>
</asp:Content>
